package com.ws.boot.demo.validate.entity;

import com.ws.boot.demo.validate.validation.annotation.Unique;
import com.ws.boot.validate.annotation.constraint.Checker;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import java.math.BigDecimal;

/**
 * 人 .
 *
 * @className: Person
 * @author: ws
 * @date: 2020/4/1 14:17
 * @version: 1.0.0
 */
@Accessors(chain = true)
@Data
public class Person3 extends BaseEntity {

    /**
     * 国籍
     */
    @NotBlank
    private String nationality;

    /**
     * 民族
     */
    @Null
    private String ethnic;

    /**
     * 身高
     */
    @Min(value = 150)
    @Max(value = 250)
    private BigDecimal height;

    /**
     * 手机号
     */
    @Unique
    private String mobile;

    /**
     * 身份证
     */
    @Checker
    private IdCard3 idCard3;

}
